#ifndef MAINDIALOG_H
#define MAINDIALOG_H

#include <QDialog>

/*定义UI对象，线程对象，信号槽（触发拷贝、更新进度，完成拷贝）*/

QT_BEGIN_NAMESPACE
namespace Ui { class MainDialog; }
QT_END_NAMESPACE

class MainDialog : public QDialog
{
    Q_OBJECT

public:
    MainDialog(QWidget *parent = nullptr);
    ~MainDialog();

signals:
    void startCopy(const QString& srcFile, const QString& destFile);

private slots:
    void on_btnSelectSourceFile_clicked();

    void on_btnSelectDestFile_clicked();

    void on_btnCopy_clicked();

    void updateCopyProgress(int progress);

    void copyFinished();


private:
    Ui::MainDialog *ui;
    QThread* copyThr;
};
#endif // MAINDIALOG_H
